﻿CREATE PROCEDURE [acms].[TemplateHierarchy_Delete]
	@Id int, 
	@ConcurencyId int
AS
	Delete TemplateHierarchy
	Where Id = @Id and ConcurencyId = @ConcurencyId
	
	if(@@rowcount = 0)begin
		if exists (select null from TemplateHierarchy where Id = @Id)
			return -100
		else
			return -200
	end
	else
		RETURN 0;